public class SwitchStatement {

	/**
	 * Problem Statement:
	 * 		Assume we have three colors 1: GREEN 2: BLUE 3:RED
	 * 		according number entered by user, display the color name. 
	 * 		if the use enter other then 1 or 2 or 3, then display invalid option msg
	 * 		use the switch statement.
	 * 		
	 * 
	 * Note:
	 * 		Observe the Third Switch result carefully
	 * 
	 * 
	 */
	
	
	public static void main(String []args) {
		
		int userSelection = 4;			// modify the value, compile and run to test the program result
		
		System.out.print("First Switch Result:");
		switch(userSelection) {
		case 1:
				System.out.print("GREEN");
				break;
		case 2:
				System.out.print("BLUE");
				break;
		case 3:
				System.out.print("RED");
				break;
		}

		System.out.print("\nSecond switch Result:");
		switch(userSelection) {
		case 1:
			System.out.print("GREEN");
			break;
		case 2:
			System.out.print("BLUE");
			break;
		case 3:
			System.out.print("RED");
			break;
		default:
			System.out.println("Invalid option");
		}
		
		System.out.print("\nThird switch Result:");
		switch(userSelection) {
		default:
			System.out.println("Invalid option");
		case 1:
			System.out.print("GREEN");
			break;
		case 2:
			System.out.print("BLUE");
			break;
		case 3:
			System.out.print("RED");
			break;
		}
		
		
		System.out.println("\nThanks for using, switch statement");

		
	}
}
